//
//  HWLiBaoTableViewCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2020/11/4.
//  Copyright © 2020 Chendaobin. All rights reserved.
//

#import "HWLiBaoTableViewCell.h"

@implementation HWLiBaoTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.beijingshituView.layer.cornerRadius = 10;
    self.beijingshituView.layer.masksToBounds = YES;
    
    self.duihuanLabel.backgroundColor = RGB(247, 247, 247);
    self.duihuanLabel.layer.cornerRadius = 11;
    self.duihuanLabel.layer.masksToBounds = YES;
    
    self.fu.layer.cornerRadius = 11;
    self.fu.layer.masksToBounds = YES;
    
    self.icoimageView.layer.cornerRadius = 10;
    self.icoimageView.layer.masksToBounds = YES;
    
    [self.fu addTarget:self action:@selector(fuliBut) forControlEvents:UIControlEventTouchUpInside];
    
    
    self.shachuBut.hidden = YES;
    
    [self.shachuBut addTarget:self action:@selector(shanchuTap) forControlEvents:UIControlEventTouchUpInside];
    
    
    
  

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}




-(void)setDataModel:(HWxingdeLBModel *)dataModel {
    
    _dataModel = dataModel ;
    
    
    [self.icoimageView sd_setImageWithURL:[NSURL URLWithString:dataModel.icon] placeholderImage:nil];
    
    self.mingchengLabel.text = [NSString stringWithFormat:@"%@",dataModel.cardname];
    self.shijianLabel.text = [NSString stringWithFormat:@"%@",dataModel.end_time];
    self.duihuanLabel.text = [NSString stringWithFormat:@"兑换码：%@",dataModel.card_no];
    
    
    
    
    
    
}



- (void)fuliBut {
    
    [self.delegate xuanzhongdeDataModel:self.dataModel];
    
    
    
    
    
}


- (void)shanchuTap {
    
    [self.delegate shanchulibao:self.dataModel];
    
    
}



@end
